<%@page import="Bibloteca.Recurso"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<style>
body {
	background:
		url("http://www.wallsave.com/wallpapers/2560x1600/fondos-azules/112816/fondos-azules-resumen-olas-pictures-for-112816.jpg")
		no-repeat;
	background-size: cover;
}

a {
	font-size: 14px;
	font-color: red;
	text-decoration: none;
}

table {
	margin: 0 auto;
	text-align: left;
	background-color: #F7D358;
	border: 5px solid black;
	background-color: #F7D358;
	text-align: left;
}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Prestamo de Recursos</title>

<script>
function reservar() {
	var forma = document.getElementById("FormaPrestamo");
	forma.action = "Prestamo.servlet";
	var accion = document.getElementById("accion");
	accion.value = "pedir";
}
</script>
</head>
<body>
<form action="" method="post" id="FormaPrestamo">
<input type="hidden" name="accion" id="accion">
	<h1 align="center">Prestamo de Recursos</h1>
	<table>
			<tr>
				<td><h3>
						<b>Recursos Disponibles</b>
					</h3></td>
			</tr>
			<tr>
				<th>Nombre</th>
				<th>Idioma</th>
				<th>ID</th>
				<th>Descriptor</th>
				<th>Estado</th>
			</tr>
			<%
				List<Recurso> listaR = (List<Recurso>) session
						.getAttribute("ListaRecursos");
				for (Recurso obj : listaR) {
			%>
			<tr>
				<td><%=obj.getNombre()%></td>
				<td><%=obj.getIdioma()%></td>
				<td><%=obj.getIdentificador()%></td>
				<td><%=obj.getDescriptor()%></td>
				<td><%=obj.getRecursolDisponible()%></td>
			</tr>
			<%
				}
			%>
			<tr>
			<td>Pedir recurso por ID</td>
			</tr>
			<tr>
			<td><input type="Text" name="ID" id="ID" placeholder="ID"
					requiered></td>
					<td><input type="submit" value="Reservar Libro" onclick="reservar();"></td>
					<input type="hidden" name="Disponible" id="Disponible" value="No Disponible">
			</tr>
		</table>
	<a href="wlcome.jsp"><input type="button" value="Atras"></a>
	<a href="Login.html"><input type="button" value="Cerrar sesion"></a>
	</form>
</body>
</html>